package cn.thoughtworks.school.entities.commands;

import cn.thoughtworks.school.entities.SurveyQuiz;
import cn.thoughtworks.school.entities.Tag;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.List;
import java.util.Set;

@Setter
@Getter
public class CreateSurveyQuizCommand {

    private String description;

    private List<String> choices;

    private List<String> tags;

    public SurveyQuiz build(Long userId, Long organizationId, Set<Tag> tags) {
        return SurveyQuiz.builder()
            .description(this.description)
            .tags(tags)
            .isAvailable(true)
            .makerId(userId)
            .createTime(new Date())
            .organizationId(organizationId)
            .build();
    }
}
